package com.cuotigou.pojo;

/**
 * onway.com Inc.
 * Copyright (c) 2016-2016 All Rights Reserved.
 */

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.cuotigou.util.DateUtil;


/**
 * json调用默认结果
 * 
 * @author guangdong.li
 * @version $Id: JsonResult.java, v 0.1 2013-10-30 下午5:38:55  Exp $
 */
public class JsonResult implements Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1475348231900998033L;

    private String            time             = DateUtil.formatDateTime();

    // 业务操作结果
    private boolean           success          = true;

    // 是否强制下线，账号已在另一设备登录
    //private boolean           isForceLogOut    = false;

    private String            message           = "";

    // 错误码
    private String            code              = "";
    
    private String            userId            = "";
    
    private List<String>      stringList        = new ArrayList<String>();
    
//    private int               cost         = 0;
    
    private String            cost              = "0";
    
    private String            id                = "";
    
    private String            name              = "";
    
    private String            accid             = "";
    
    private String            token             = "";
    
    private int            	  minutes           = 0;
    
    private String            day               = "";
    
//    private List<BannerResult>  bannerList      = new ArrayList<BannerResult>();
//
//    private List<NoticeResult>  noticeList      = new ArrayList<NoticeResult>();
//
//    private List<VipResult> vipList      = new ArrayList<VipResult>();
    
    private int noreadCount                     = 0;
    
    private String inviteUrl                    = "";
    
    private String inviteTitle                  = "";
    
    private String inviteImg                    = "";
    
    private String inviteContent                = "";
    
    private boolean billingCell                 = true;
    
    private String  userCell                    = "";

    private String isVip						= "";

    public JsonResult(boolean bizSucc) {
        this.success = bizSucc;
    }

    public JsonResult(boolean bizSucc, String errCode, String message) {
        this.success = bizSucc;
        this.message = message;
        this.code = errCode;
    }

    public JsonResult() {
		// TODO Auto-generated constructor stub
	}

	public void markResult(boolean bizSucc, String errCode, String message) {
    	this.success = bizSucc;
        this.message = message;
        this.code = errCode;
    }
	
	/**
     * 设置结果集
     * 
     * @param success
     * @param resultCode
     */
//    public void markResult(boolean success, EnumBase resultCode) {
//        this.success = success;
//        if (resultCode != null) {
//            this.code = resultCode.name();
//            this.message = resultCode.message();
//        }
//    }

    public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public List<String> getStringList() {
		return stringList;
	}

	public String getCost() {
		return cost;
	}

	public void setCost(String cost) {
		this.cost = cost;
	}

	public void setStringList(List<String> stringList) {
		this.stringList = stringList;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAccid() {
		return accid;
	}

	public void setAccid(String accid) {
		this.accid = accid;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public int getMinutes() {
		return minutes;
	}

	public void setMinutes(int minutes) {
		this.minutes = minutes;
	}

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}

//	public List<BannerResult> getBannerList() {
//		return bannerList;
//	}
//
//	public void setBannerList(List<BannerResult> bannerList) {
//		this.bannerList = bannerList;
//	}

	public int getNoreadCount() {
		return noreadCount;
	}

	public void setNoreadCount(int noreadCount) {
		this.noreadCount = noreadCount;
	}

//	public List<NoticeResult> getNoticeList() {
//		return noticeList;
//	}
//
//	public void setNoticeList(List<NoticeResult> noticeList) {
//		this.noticeList = noticeList;
//	}

	public String getInviteUrl() {
		return inviteUrl;
	}

	public void setInviteUrl(String inviteUrl) {
		this.inviteUrl = inviteUrl;
	}

	public String getInviteTitle() {
		return inviteTitle;
	}

	public void setInviteTitle(String inviteTitle) {
		this.inviteTitle = inviteTitle;
	}

	public String getInviteImg() {
		return inviteImg;
	}

	public void setInviteImg(String inviteImg) {
		this.inviteImg = inviteImg;
	}

	public String getInviteContent() {
		return inviteContent;
	}

	public void setInviteContent(String inviteContent) {
		this.inviteContent = inviteContent;
	}

	public boolean isBillingCell() {
		return billingCell;
	}

	public void setBillingCell(boolean billingCell) {
		this.billingCell = billingCell;
	}

	public String getUserCell() {
		return userCell;
	}

	public void setUserCell(String userCell) {
		this.userCell = userCell;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getIsVip() {
		return isVip;
	}

	public void setIsVip(String isVip) {
		this.isVip = isVip;
	}

//	public List<VipResult> getVipList() {
//		return vipList;
//	}
//
//	public void setVipList(List<VipResult> vipList) {
//		this.vipList = vipList;
//	}
}
